package com.yunban.project.template.model.domain;

import com.baomidou.mybatisplus.annotation.*;
import net.lab1024.sa.base.ProjectConstants;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author: lijiajun
 * @date: 2024-11-06
 * @version: 1.0
 */
@Data
@Schema(description = "前端模板")
@TableName(ProjectConstants.TEMPLATE_TABLE_PREFIX + "template")
public class Template implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Long id;
    private long blockTypeId;
    private String name;
    private String code;
    private String html;
    // 内层 模板
    private String innerHtml;
    @Schema(description = "使用数量")
    private int useCount;
    @Schema(description = "收藏数量")
    private int collectCount;
    private String diagram;
    @TableField(exist = false)
    @Schema(description = "是否发布公开")
    private boolean published = true;
    @TableLogic
    private boolean deleted = false;
    @TableField(fill = FieldFill.INSERT)
    private long createdBy;
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;
}
